#!/bin/sh

set -eo pipefail

export APP_ENV=${APP_ENV:-product}
export EXEC_CMD="${EXEC_CMD:-date}"


php -v
echo "检测当前环境:${APP_ENV}"
echo "更换yaf系统环境"
sed -i "s/product/${APP_ENV}/g" /usr/local/etc/php/conf.d/docker-php-ext-yaf.ini

echo "执行自定义命令${EXEC_CMD}"
${EXEC_CMD}


exec "$@"